package com.prj.ufdm.cloud.ms.core.enums;

/**
 * Desc: 核心模块返回码（编码规则：00 + 2位功能编号(去除00与99的编号)  + 3位错误编号）
 * 
 * @author 胡义振
 * @date 2018-03-19
 */
public enum CoreRetCodeEnum {
	
	RET_CODE_0001000("0001000",""),
	RET_CODE_0098999("0098999","系统异常");
	
	private String code;
	private String message;
	
	CoreRetCodeEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	public static String getRetMessage(String retCode){
		String rtnRetCode = "";
		for (CoreRetCodeEnum coreRetCodeEnum : CoreRetCodeEnum.values()) {
			if(coreRetCodeEnum.code.equals(retCode)){
				rtnRetCode = coreRetCodeEnum.message;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
